﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ASPItalia.ModelVirtualCasting.ObjectModel.Candidate>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Crea il tuo profilo su M.V.C.</h2>
    
    <% if (!this.ViewData.ModelState.IsValid) {%>
        <div id="validationSummary" title="Errore!">
            <%= Html.ValidationSummary("Sono stati riscontrati i seguenti errori: correggerli prima di proseguire.") %>
        </div>
        <script type="text/javascript">
            $(function () {
                $('#validationSummary').dialog({
                    modal: true,
                    buttons: {
                        Ok: function () { $(this).dialog('close'); }
                    }
                });
            });
        </script>
    <% } %>
    
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) {%>
            <%= Html.EditorForModel() %>
            <p>
                <input type="submit" value="Create" />
            </p>
    <% } %>

    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

